feat: capacidad de transporte (TransportCapacity) — núcleo + persistencia (#105)#148
Closed
vgpastor wants to merge 1 commit into
Closed
feat: capacidad de transporte (TransportCapacity) — núcleo + persistencia (#105)#148vgpastor wants to merge 1 commit into
vgpastor wants to merge 1 commit into
Conversation
…ncia (#105) Núcleo del contexto logistics (parte de #105, EPIC #103): oferta de servicio de transporte (no de material), distinta de offers. - Dominio: agregado TransportCapacity (proveedor voluntario/organización, modo road/sea/air, capacidad peso/volumen, corredor origen->destino o área, ventana y refrigerado) con máquina de estados available->reserved/withdrawn. - Aplicación: PublishCapacity (valida emergencia activa), WithdrawCapacity y ListCapacities (vistas serializables, filtros por modo/estado). - Persistencia: repo en memoria + repo drizzle + tabla transport_capacities (migración 0027) + int-spec. Tests de dominio y aplicación (in-memory) verdes en local; el int-spec y la migración los ejecuta CI contra Postgres. Pendiente de finalizar en local (necesita infra): controller/módulo HTTP + DTOs, pnpm gen:api (cliente tipado) y el frontend. No cierra #105 (solo backend de dominio/persistencia).
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Author
|
Cierro como duplicado. Mientras preparaba esta PR, otra sesión ya implementó y fusionó el contexto Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parte de #105 (EPIC #103). Backend de dominio + persistencia del contexto nuevo
logistics. No cierra #105: el HTTP + frontend +gen:apise finalizan en local (ver abajo).Qué hace
La capacidad de transporte = oferta de un servicio logístico (mover carga de A a B), distinta del agregado de material
DonationOffer. Es la capa 2 ("QUÉ capacidad") del EPIC, y donde encaja el feedback original (la camioneta / las toneladas de la aerolínea).Dominio (
logistics/domain)TransportCapacity: proveedor polimórfico (volunteer/organization),mode(road/sea/air — moto/coche/camioneta =road), capacidad (weightKg/volumeM3, al menos uno > 0), corredor (originMunicipality→destinationMunicipalityopcional) o área, ventana (availableFrom/availableUntil),refrigerated.available → reserved → (release) → availabley→ withdrawn, con invariantes y errores de dominio.Aplicación
PublishCapacity(valida que la emergencia esté activa, vía port),WithdrawCapacity,ListCapacities(vistas serializables, filtros por modo/estado).Persistencia
InMemoryTransportCapacityRepository+DrizzleTransportCapacityRepository+ tablatransport_capacities(migración0027) + int-spec.Verificación
pnpm --filter api build(tsc) · eslint · prettier · 14 tests de dominio+aplicación (in-memory, sin DB).Pendiente de finalizar en local (necesita Postgres+Redis)
POST /…/transport-capacities,GET …,POST …/withdraw) y registro enapp.module.pnpm gen:api→ commit deschema.ts.Coordinación
0027: si otra PR en vuelo (p. ej. feat(emergencies): prioridades sanitarias recomendadas #111) toma0027antes, renumero al siguiente libre al rebasar (convención del repo).resources): no comparte archivos.